package cn.congine.wizarpos.mall.dao.hibernate;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import cn.congine.wizarpos.mall.dao.MrtMerchantCarouselDao;
import cn.congine.wizarpos.mall.entity.MrtMerchantCarousel;

@Repository("mrtMerchantCarouselDao")
public class MrtMerchantCarouselDaoHibernate extends
		GenericDaoHibernate<MrtMerchantCarousel> implements MrtMerchantCarouselDao {

	public MrtMerchantCarouselDaoHibernate() {
		super(MrtMerchantCarousel.class);
	}

	@Override
	public List<MrtMerchantCarousel> getMrtMerchantCarouselList(String mid) {
		Query query = getSession()
				.createQuery(
						"from MrtMerchantCarousel where mid = :mid")
				.setParameter("mid", mid);
		return (List<MrtMerchantCarousel>) query.list();
	}

}
